<!DOCTYPE html>
<html>
    <head>
        <title><?php echo $data['title']; ?></title>
        <meta charset="UTF-8">
        <link rel="stylesheet"  type="text/css" href="./css/books.css">
    </head>
    <body>
        <div class="mainBody">
            <div class="head">
                <div class="headLeft">
                    <a href="index.php">Всички книги | </a>
                    <a href="index.php?p=new-book">Нова книга | </a>
                    <a href="index.php?p=new-author">Нов автор</a>
                </div>
                <div class="headRight">
                    <?php
                    if (isset($_SESSION['isLogged']) && $_SESSION['isLogged'] == true) {
                        echo 'Здравей, <a href="index.php?p=user&user_id=' . $_SESSION['user_id'] . '"><span class="userBold">' . htmlspecialchars($_SESSION['username']) . '</span> | ' . '</a>';
                        echo '<a href="index.php?p=logout">Отписване</a>';
                    } else {
                        echo '<a href="index.php?p=login">Вход | </a>';
                        echo '<a href="index.php?p=register">Регистраця</a>';
                    }
                    ?>
                </div>
            </div>